<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/vue/2.5.16/vue.min.js"></script>
    <script src="js/axios/0.17.1/axios.min.js"></script>
</head>
<body>
<div id="app">
    <button-counter></button-counter>
</div>

<script>// 定义一个名为 button-counter 的新组件
Vue.component('button-counter', {
    data: function () {
        return {
            count: 0,
        }
    },
    template: '<button v-on:click="count++">You clicked me {{ count }} times.</button>'
})

var app = new Vue({
    el: '#app',
    data: {
        message: 'Hello Vue!',
        user: '',
        uri: "userdetail",
        uname: '',
        uid: '',
        message: 'zheshi '
    }, methods: {
        load: function () {
            let url = this.uri;
            this.message = "aaaa";
            console.log(url)
            var _self = this;
            axios.get(url).then(response => {
                _self.uid = response.data.id;
                console.log(_self.uid)
            });
        }
    }
})
</script>

</body>
</html>